module TowerShootP {
	provides interface Init;
	provides interface DoForSomeTime as Shoot;

	uses interface GeneralIO as ShootPin;
	uses interface Timer<TMilli>;
}

implementation {

	command error_t Init.init() {
		call ShootPin.clr();		
		call ShootPin.makeOutput();
		return SUCCESS;
	}
	
	command void Shoot.doit(uint16_t time) {
		call Timer.startOneShot(time);
		call ShootPin.set();		
	}

	event void Timer.fired() {
		call ShootPin.clr();		
	}
}
